package com.example.demo.serviceImp.Imp;

import com.example.demo.dao.IUser;
import com.example.demo.entity.User;
import com.example.demo.serviceImp.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImp implements UserService {

    @Autowired
    private IUser iUser;

    @Override
    public int insert(User user) {
        return iUser.insertUser(user);
    }

    @Override
    public int delete(int id) {
        return iUser.deleteUser(id);
    }

    @Override
    public int update(User user) {
        return iUser.updateUser(user);
    }

    @Override
    public List<User> search() {
        return iUser.search();
    }
}
